<?php defined( '_SYS' ) or die( 'No direct script access allowed' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><?php echo $this->title;$weburl = WEBURL.'/'.SELF; ?></title>
<?php echo $this->headData; ?>
</head>
<body>

	<div id="toolbar-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>
		<div class="m">
			<div class="toolbar" id="toolbar">
				<table class="toolbar">
					<tr>
						<td class="button" id="toolbar-save">
							<a href="#" onclick="javascript: submitbutton('save')" class="toolbar">
								<span class="icon-32-save" title="Save">
								</span>
							<?php echo C_text::_('Save');?>
							</a>
						</td>

						<td class="button" id="toolbar-apply">
							<a href="#" onclick="javascript: submitbutton('apply')" class="toolbar">
								<span class="icon-32-apply" title="Apply">
								</span>
							<?php echo C_text::_('Apply');?>
							</a>
						</td>

						<td class="button" id="toolbar-cancel">
							<a href="#" onclick="javascript: submitbutton('cancel')" class="toolbar">
								<span class="icon-32-cancel" title="Cancel">
								</span>
							<?php echo C_text::_('Cancel');?>
							</a>
						</td>
					</tr>
				</table>
			</div>
			<div class="header icon-48-component"><?php echo C_text::_('ToolBox');?>: <small><small><?php echo $this->subTitle;?></small></small></div>	
			<div class="clr"></div>		
		</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
	</div>
	<div class="clr"></div>
<?php if($this->message) echo $this->message;?>
<div id="element-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>	
<div class="m" id="width-100">
	
	
	<form action="<?php echo WEBSELF; ?>/fdform" method="post" name="adminForm" onsubmit="return checkPaging()">

<div class="width-100">
	<fieldset class="adminform">
		<legend><?php echo C_text::_('Form_Detail');?></legend>		
		<div class="pane-sliders">
			<?php
			$langs = $SYS->lang->getALL(1,'backend');
			for($i=0;$i<count($langs);$i++)			
			{
				$tmplang=$langs[$i];
				
				if(isset($this->namefield[$i]['id']))
				{					
					$namevalue = $this->namefield[$i]['fieldvalue'];
					$nameid = '<input type="hidden" name="nameid['.$tmplang->id.']" value="'.$this->namefield[$i]['id'].'" />';
				}else
				{
					$namevalue = '';
					$nameid = '';
				}
				if(isset($this->replycontent[$i]['id']))
				{					
					$replycontentvalue = $this->replycontent[$i]['fieldvalue'];
					$replycontentid = '<input type="hidden" name="replycontentid['.$tmplang->id.']" value="'.$this->replycontent[$i]['id'].'" />';
				}else
				{
					$replycontentvalue = '';
					$replycontentid = '';
				}
				if(isset($this->introducefield[$i]['id']))
				{					
					$introducevalue = $this->introducefield[$i]['fieldvalue'];
					$introduceid = '<input type="hidden" name="introduceid['.$tmplang->id.']" value="'.$this->introducefield[$i]['id'].'" />';
				}else
				{
					$introducevalue = '';
					$introduceid = '';
				}
				if(isset($this->replysubject[$i]['id']))
				{					
					$replysubjectvalue = $this->replysubject[$i]['fieldvalue'];
					$replysubjectid = '<input type="hidden" name="replysubjectid['.$tmplang->id.']" value="'.$this->replysubject[$i]['id'].'" />';
				}else
				{
					$replysubjectvalue = '';
					$replysubjectid = '';
				}
			?>
			<div class="panel">
				<h4 id="cpanel-panel-logged" class="title pane-toggler"><a href="#"><span><?php echo $tmplang->title;?></span></a></h4>
				<div class="pane-slider content">
				<table class="admintable" cellpadding="1">
				<tr class="row0">
					<td width="150"  class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item2' ); ?>::<?php echo C_text::sprintf( 'f_Tip2',$tmplang->title); ?>">
							<?php echo C_text::_( 'Item2' ); ?>
						</label>
					</td>
					<td>
						<input type="text" name="name_<?php echo $tmplang->id; ?>" id="name_<?php echo $tmplang->id; ?>" class="inputbox must" size="40" value="<?php echo $namevalue; ?>" />
						<?php echo $nameid;?>
					</td>
				</tr>
				<tr>
					<td width="150"  class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item15' ); ?>::<?php echo C_text::sprintf( 'f_Tip15',$tmplang->title); ?>">
							<?php echo C_text::_( 'Item15' ); ?>
						</label>
					</td>
					<td>
						<textarea class="text_area" cols="60" rows="20" style="width:600px; height:120px" name="introduce_<?php echo $tmplang->id; ?>" ondblclick="replaceContent('introduce_<?php echo $tmplang->id; ?>')"><?php echo $introducevalue; ?></textarea>
						<?php echo $introduceid;?>
					</td>
				</tr>
				<tr>
					<td width="150"  class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item10' ); ?>::<?php echo C_text::sprintf( 'f_Tip10',$tmplang->title); ?>">
							<?php echo C_text::_( 'Item10' ); ?>
						</label>
					</td>
					<td>
						<input type="text" name="replysubject_<?php echo $tmplang->id; ?>" id="replysubject_<?php echo $tmplang->id; ?>" class="inputbox" size="40" value="<?php echo $replysubjectvalue; ?>" />
						<?php echo $replysubjectid;?>
					</td>
				</tr>
				<tr>
					<td width="150"  class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item11' ); ?>::<?php echo C_text::sprintf( 'f_Tip11',$tmplang->title); ?>">
							<?php echo C_text::_( 'Item11' ); ?>
						</label>
					</td>
					<td>
						<textarea class="text_area" cols="60" rows="20" style="width:600px; height:120px" name="replycontent_<?php echo $tmplang->id; ?>" ondblclick="replaceContent('replycontent_<?php echo $tmplang->id; ?>')"><?php echo $replycontentvalue; ?></textarea>
						<?php echo $replycontentid;?>
					</td>
				</tr>
				</table>
				</div>
			</div>
			<?php
			}
			$params = unserialize($this->item['params']);
			$limitNumOfIP = intval($params['limitnum']);
			$online = $params['online'];
			?>
		</div>
		<table class="admintable" cellspacing="1">				
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item5' ); ?>::<?php echo C_text::_( 'f_Tip5' ); ?>">
							<?php echo C_text::_( 'Item5' ); ?>
						</label>
					</td>
					<td>
						<?php echo C_HTML::_('select.booleanlist', 'enabled', 'class="inputbox"', $this->item['enabled']);?>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item3' ); ?>::<?php echo C_text::_( 'f_Tip3' ); ?>">
							<?php echo C_text::_( 'Item3' ); ?>
						</label>
					</td>
					<td>
						<?php echo C_HTML::_('select.booleanlist', 'online', 'class="inputbox"', $online);?>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item12' ); ?>::<?php echo C_text::_( 'f_Tip12' ); ?>">
							<?php echo C_text::_( 'Item12' ); ?>
						</label>
					</td>
					<td>
						<input type="text" name="limitnum" id="limitnum" class="inputbox" size="5" value="<?php echo $limitNumOfIP; ?>" />
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item6' ); ?>::<?php echo C_text::_( 'f_Tip6' ); ?>">
							<?php echo C_text::_( 'Item6' ); ?>
						</label>
					</td>
					<td>
						<?php echo C_HTML::_( 'access.usergroup','access',$this->item['access']);?>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item24' ); ?>::<?php echo C_text::_( 'f_Tip24' ); ?><br /><img name=themeimg src=<?php echo SITEURL.'/templates/forms/default/preview.png';?> />">
							<?php echo C_text::_( 'Item24' ); ?>
						</label>
					</td>
					<td>
						<?php echo $this->themes;?>
					</td>
				</tr>				
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item9' ); ?>::<?php echo C_text::_( 'f_Tip9' ); ?>">
							<?php echo C_text::_( 'Item9' ); ?>
						</label>
					</td>
					<td>
						<?php echo C_HTML::_('select.booleanlist', 'reply', 'class="inputbox"', $this->item['reply']);?>
					</td>
				</tr>				
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item14' ); ?>::<?php echo C_text::_( 'f_Tip14' ); ?>">
							<?php echo C_text::_( 'Item14' ); ?>
						</label>
					</td>
					<td>
						<?php echo $this->replaymailto;?>
					</td>
				</tr>								
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item17' ); ?>::<?php echo C_text::_( 'f_Tip17' ); ?>">
							<?php echo C_text::_( 'Item17' ); ?>
						</label>
					</td>
					<td>
						<?php echo C_HTML::_('select.booleanlist', 'notice', 'class="inputbox"', $this->item['notice']);?>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item18' ); ?>::<?php echo C_text::_( 'f_Tip18' ); ?>">
							<?php echo C_text::_( 'Item18' ); ?>
						</label>
					</td>
					<td>
						<input type="text" name="noticemailto" id="noticemailto" class="inputbox" size="40" value="<?php echo $this->item['noticemailto']; ?>" />
						<?php echo C_text::_( 'Item22' ); ?>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item7' ); ?>::<?php echo C_text::_( 'f_Tip7' ); ?>">
							<?php echo C_text::_( 'Item7' ); ?>
						</label>
					</td>
					<td>
						<span id="f_rangeStart_trigger">
						<input id="startdate" name="startdate" value="<?php echo substr($this->item['startdate'],0,10);  ?>" />
						<img  alt="calendar" src="<?php echo $this->imagePath;?>calendar.png" class="calendar"/>
						</span>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item8' ); ?>::<?php echo C_text::_( 'f_Tip8' ); ?>">
							<?php echo C_text::_( 'Item8' ); ?>
						</label>
					</td>
					<td>
						<span id="f_rangeEnd_trigger">
						<input id="finishdate" name="finishdate" value="<?php echo substr($this->item['finishdate'],0,10); ?>" />
						<img alt="calendar" src="<?php echo $this->imagePath;?>calendar.png" class="calendar"/>
						</span>
					</td>
				</tr>
				<?php if(isset($this->item)) :?>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item21' ); ?>::<?php echo C_text::_( 'f_Tip21' ); ?>">
							<?php echo C_text::_( 'Item21' ); ?>
						</label>
					</td>
					<td>
						<?php echo $this->item['created_date'];?>
					</td>
				</tr>
				<tr class="row0">
					<td width="150" class="key">
						<label class="editlinktip hasTip" title="<?php echo C_text::_( 'Item19' ); ?>::<?php echo C_text::_( 'f_Tip19' ); ?>">
							<?php echo C_text::_( 'Item19' ); ?>
						</label>
					</td>
					<td>
						<?php echo $this->item['modified_date'];?>
					</td>
				</tr>
				<?php endif;?>				
			</table>
	</fieldset>

	<input type="hidden" name="task" value="" />
	<input type="hidden" name="apply" value="<?php echo $this->apply; ?>" />
	<input type="hidden" name="id" value="<?php if(isset($this->item['id'])) echo $this->item['id']; ?>" />
	<?php echo C_HTML::_( 'form.token' ); ?>
</div>	
</form>

</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
</div>
<div id="forTips"></div>
<center>
	Powered by <b><a href='http://www.metinfo.cn' target='_blank'>MetInfo</a></b> ©2008- <?php echo date('Y',time());?>&nbsp;<a href='http://www.metinfo.cn' target='_blank'>www.MetInfo.cn</a>
</center>
<?php echo $this->js; ?>
</body>
</html>